@mixin form {

  .el-input input,
  .el-select,
  .el-date-editor {
    border: 0;
    border-radius: 0;
    border-bottom: 1px solid rgba($color: #e5e5e5, $alpha: 0.9);

    &:focus {
      border-bottom: 1px solid rgba($color: #e5e5e5, $alpha: 0.9);
    }
  }
}

/* 用于修改element样式 */
.container {
  height: 100%;
}

.container .el-container {
  height: 100%;

  &:nth-child(2) {
    overflow: hidden;
  }
}

// 菜单栏收起时右侧下拉icon的显示问题
.el-menu--collapse {

  span,
  .el-submenu__icon-arrow {
    height: 0;
    width: 0;
    overflow: hidden;
    visibility: hidden;
    display: inline-block;
  }
}

.el-table {
  margin-bottom: 30px;
  width: 99.9% !important;
}

.el-divider__text {
  font-style: normal;
  font-weight: 600;
  font-size: 1.1em;
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
  ;
}

.child {
  background-color: inherit;
}

.child .el-divider__text {
  font-weight: 600;
  color: rgba(82, 82, 82, 0.7);
}

/* disabled 时字体样式 */
.el-input.is-disabled .el-input__inner,
.el-textarea.is-disabled .el-textarea__inner {
  color: #000000;
  font-weight: 600;
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
}

.el-pagination {

  button.btn-prev,
  button.btn-next {
    background-color: inherit;
  }

  .el-pager {
    li {
      background-color: inherit;
    }
  }
}

// 修复element table列表组件 多选框样式
.el-table-column--selection {
  .cell {
    padding: 0 10px;
  }
}

/* 左侧菜单栏 滚动条样式 */
.el-main,
.el-aside {

  // 滚动条整体部分
  &::-webkit-scrollbar {
    position: absolute;
    width: 6px;
  }

  // 滚动条内层滚动槽
  &::-webkit-scrollbar-track-piece {
    background: inherit
  }

  // 滚动条滑块
  &::-webkit-scrollbar-thumb {
    border-radius: 10px;
    -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
    background-color: rgba($color: #ffffff, $alpha: 0.2);
  }
}

/* table 列表组件 无数据时 */
.el-table__empty-block {
  min-height: 400px !important;

  .el-table__empty-text {
    position: absolute;
    top: 50%;
    left: 50%;
    margin: auto;
    transform: translate(-50%, -50%);
  }

  .yl-table-empty {
    img {
      width: 160px;
      display: block;
      margin: 0 auto 10px;
    }

    font: {
      size: 1.2em;
      weight: 700
    }
  }
}

/* dialog样式 */
.yl-dialog {
  .el-dialog {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;

    .el-dialog__header {
      background: rgba($color: #3ea1c1, $alpha: 1.0);
      padding: 15px 30px;
      border-top-left-radius: 10px;
      border-top-right-radius: 10px;

      .el-dialog__title {
        color: #ffffff;
        letter-spacing: 2px;

        font: {
          size: 16px;
          weight: 700;
          font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
        }
      }

      button {
        top: 17px;

        i.el-dialog__close {
          color: #fff;

          font: {
            size: 16px;
            weight: 700;
          }

          ;
        }
      }
    }

    .el-dialog__body {
      padding: 30px 60px;

      .el-form {
        .el-form-item {
          margin-bottom: 30px;
        }
      }
    }

    .dialog-footer {
      text-align: center;
    }
  }
}

/* form表单样式 */
/* 常规表单样式*/
// inline模式
.yl-form-item-inline__content {
  .el-form-item {
    @include form;

    .el-input,
    .el-select,
    .el-cascader {
      width: 90%;
    }

    .el-date-editor {
      width: 90%;

      .el-range-input {
        width: 50%;
      }
    }

    .el-select {
      border-bottom: 0;

      .el-input {
        width: 100%;
      }
    }

    .el-textarea {
      width: 95%;
    }
  }
}

// 非inline模式
.yl-form-item__content {
  .el-form-item {
    @include form;
    display: block;

    .el-input,
    .el-select,
    .el-cascader {
      width: 100%;

      input {
        text-align: center;
      }
    }

    .el-date-editor {
      width: 100%;

      .el-range-input {
        width: 50%;
      }
    }

    .el-select {
      border-bottom: 0;

      .el-input {
        width: 100%;
      }
    }

    .el-textarea {
      width: 100%;
    }
  }
}

/* <i/>样式 */
i.yl-no-icon {
  display: inline-block;
  margin-right: 5px;
  width: 18px;
}

/* el-col 第一个 用于处理面包屑及按钮line-height */
.yl-col {
  display: flex !important;

  .yl-bread-list {
    .el-breadcrumb {
      line-height: 60px;
      padding: 0 20px;

      font: {
        size: 16px;
        family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
      }

      ;
    }
  }
}


/* 表单组件按钮样式表 */
.yl-form-btn-list {
  .el-form-item__content {
    margin: 0 !important;

    div {
      margin-left: 80px;

      &:first-child {
        margin-left: 0px;
      }
    }
  }
}